home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
CADAR
/
Symbols
/
Other
/
equal-tempered-scale
< prev
next >
Wrap
Text File
|
1998-10-22
|
1KB
|
38 lines
equal-tempered-scale
n frequency &key (pcnt 100) (dig 3)
creates an equal-tempered frequency-scale of n
frequencies starting from frequency.
With percent = 100 you will always get an octave.
If you change the percent you can compress
or expand the octave.
dig controls the amount of digits (rounding)
(equal-tempered-scale 12 64)
->(64.0 67.806 71.838 76.109 80.635 85.43 90.51 95.892 101.594 107.635 114.035 120.816 128.0)
(equal-tempered-scale 12 64 :dig 1)
->(64.0 67.8 71.8 76.1 80.6 85.4 90.5 95.9 101.6 107.6 114.0 120.8 128.0)
(equal-tempered-scale 12 64 :pcnt 120 :dig 1)
->(64.0 68.6 73.5 78.8 84.4 90.5 97.0 104.0 111.4 119.4 128.0 137.2 147.0)
(mapcar #'freq-to-note
(equal-tempered-scale 21 16 :pcnt 333 :dig 1))
->((c 4) (d 4) (e 4) (|F#| 4) (|G#| 4) (|A#| 4) (b 4) (|C#| 5) (|D#| 5) (f 5) (g 5) (a 5) (b 5) (|C#| 6) (|D#| 6) (f 6) (|F#| 6) (|G#| 6) (|A#| 6) (c 7) (d 7) (e 7))
(ton-to-syms
(flatten (mapcar #'freq-to-note
(equal-tempered-scale 21 8 :pcnt 333))))
->(-m -k -i -g -e -c -b b d f h j l n p r s u w y [ ])
(syms-to-ton
(symbol-transpose 3
'(-m -k -i -g -e -c -b b d f h j l n p r s u w y [ ])))
->(|D#| 3 f 3 g 3 a 3 b 3 |C#| 4 d 4 e 4 |F#| 4 |G#| 4 |A#| 4 c 5 d 5 e 5 |F#| 5 |G#| 5 a 5 b 5 |C#| 6 |D#| 6 f 6 g 6)